<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "mkt_msg_log".
 *
 * @property integer $id
 * @property string $ToUserName
 * @property string $FromUserName
 * @property integer $CreateTime
 * @property string $MsgType
 * @property string $WholeMsg
 * @property integer $created_at
 * @property integer $updated_at
 * @property double $elapsetime
 */
class MktMsgLog extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'mkt_msg_log';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['ToUserName', 'FromUserName', 'created_at', 'updated_at'], 'required'],
            [['CreateTime', 'created_at', 'updated_at'], 'integer'],
            [['elapsetime'], 'number'],
            [['ToUserName', 'FromUserName'], 'string', 'max' => 64],
            [['MsgType'], 'string', 'max' => 255],
            [['WholeMsg'], 'string', 'max' => 1024]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'ToUserName' => 'To User Name',
            'FromUserName' => 'From User Name',
            'CreateTime' => 'Create Time',
            'MsgType' => 'Msg Type',
            'WholeMsg' => 'Whole Msg',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'elapsetime' => 'Elapsetime',
        ];
    }

    /**
     * @inheritdoc
     * @return MktMsgLogQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new MktMsgLogQuery(get_called_class());
    }
}
